Skip to main content

Rcs Template APIs

The Rcs Template APIs allow businesses to send pre-approved Rcs message templates to end users using their Rcs Business account. These APIs support customizable components like text, media, buttons, and dynamic parameters for personalized communication.


Prerequisites

Before using the RCS Template APIs, ensure the following requirements are met:

  1. RCS Business Account
    Your business must be registered for RCS messaging. Share the required business details with the Msgkart team to enable RCS services.

  2. Business ID
    A valid Msgkart Business ID is required to create, list, and retrieve RCS templates.

  3. API Key
    You must have an active API key provided by Msgkart. This key must be sent in the request headers as x-api-key for authentication.

  4. Template Approval
    All RCS templates must be created and approved before they can be used for sending messages.


RCS Template Creation

The RCS Template Creation API allows businesses to create and register pre-approved RCS message templates. These templates define the structure of Rich Card messages, including title, description, media, and interactive buttons, which can later be used for sending RCS messages to end users.

Request Syntax

POST /api/v2/resource/<BUSINESS ID>/rcs/template

Request headers

    "x-api-key": "<API KEY>"

Request Body

{
"rcsOutgoingMessage": {
"richCard": {
"standaloneCard": {
"cardOrientation": "VERTICAL",
"cardContent": {
"title": "{{title}}",
"description": "{{description}}",
"media": {
"contentInfo": {
"fileUrl": "{{fileUrl}}"
},
"height": "MEDIUM"
},
"suggestions": [
{
"action": {
"text": "{{text}}",
"postbackData": "{{postbackData}}",
"openUrlAction": {
"url": "{{url}}",
"application": "{{application}}",
"webviewViewMode": "{{webviewViewMode}}"
}
}
}
]
}
}
}
},
"messageTemplate": {
"name": "{{name}}",
"language": "{{language}}"
}
}

Response Body

{
"id": "{{id}}",
"status": "{{status}}",
"template": {
"name": "{{name}}",
"language": "{{language}}",
"id": "{{id}}"
},
"rcsOutgoingMessage": {
"richCard": {
"standaloneCard": {
"cardOrientation": "VERTICAL",
"cardContent": {
"title": "{{title}}",
"description": "{{description}}",
"media": {
"contentInfo": {
"fileUrl": "{{fileUrl}}"
},
"height": "MEDIUM"
},
"suggestions": [
{
"action": {
"text": "{{text}}",
"postbackData": "{{postbackData}}",
"openUrlAction": {
"url": "{{url}}",
"application": "{{application}}",
"webviewViewMode": "{{webviewViewMode}}"
}
}
}
]
}
}
}
}
}

Properties

FieldDescriptionExample
x-api-keyAPI key used for authentication (request header)abc123xyz
messageTemplate.nameUnique name for the RCS templatepayment_reminder
messageTemplate.languageLanguage code for the templateen
cardContent.titleTitle text displayed on the Rich CardPayment Due
openUrlAction.urlURL opened when the action button is clickedhttps://pay.example.com

Get RCS Template List

The Get RCS Template List API retrieves all RCS message templates created for a specific business account. This helps businesses view available templates along with their approval status, language, and basic structure before using them for message delivery.

Request Syntax

GET /api/v2/resource/<BUSINESS ID>/rcs/template/list

Request headers

    "x-api-key": "<API KEY>"

Response Body

{
"data": [
{
"agentId": "RCSTemplate:{{agentId}}",
"rcsTemplateId": "{{rcsTemplateId}}",
"messageTemplate": {
"name": "{{name}}",
"language": "{{language}}",
"components": [
{
"type": "BODY",
"text": "{{text}}"
}
],
"id": "{{id}}"
},
"rcsSpecificFields": {
"title": [
"{{title}}"
]
},
"rcsOutgoingMessage": null,
"status": "APPROVED",
"createdAt": "2025-11-24T13:17:50.130Z",
"ttl": 0
},
]
}

Properties

FieldDescriptionExample
x-api-keyAPI key provided by Msgkart (request header)abc123xyz
dataList of RCS templates for the business
rcsTemplateIdUnique identifier of the RCS templatetemplate_12345
messageTemplate.nameName of the RCS templatepayment_reminder
statusCurrent approval status of the templateAPPROVED

Get RCS Template

Retrieves the complete details of a single RCS template using its unique templateId. This API returns the template structure, including header, body content, buttons, and approval status.

Request Syntax

GET /api/v2/resource/<BUSINESS ID>/rcs/template?templateId={{templateId}}

Request headers

    "x-api-key": "<API KEY>"

Response Body

{
"agentId": "RCSTemplate:{{agentId}}",
"rcsTemplateId": "{{templateId}}",
"messageTemplate": {
"name": "{{templateName}}",
"language": "{{language}}",
"components": [
{
"type": "HEADER",
"format": "IMAGE",
"example": {
"header_handle": [
"{{headerImage}}"
]
}
},
{
"type": "BODY",
"text": "{{bodyText}}"
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "URL",
"text": "{{buttonText}}",
"url": "{{buttonUrl}}"
},
{
"type": "URL",
"text": "{{buttonText}}",
"url": "{{buttonUrl}}"
}
]
}
],
"id": "{{templateId}}"
},
"rcsSpecificFields": {
"title": [
""
]
},
"rcsOutgoingMessage": null,
"status": "APPROVED",
"createdAt": "2025-05-08T06:11:31.252Z",
"ttl": 0
}

Properties

FieldDescriptionExample
rcsTemplateIdUnique identifier of the RCS templatetemplate_12345
messageTemplate.nameName of the RCS templatepayment_reminder
messageTemplate.languageLanguage used in the templateen
messageTemplate.componentsTemplate structure (header, body, buttons)
statusApproval status of the templateAPPROVED